package com.devin.controller;

import com.devin.model.ChatMessage;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author: simpl
 * @date: 2020/3/20
 * @time: 15:52
 * @description: 
 */


@Controller
public class Index {

//    @RequestMapping("/")

    @MessageMapping("/sendMessage")
    public void getIndex(@Payload ChatMessage message){

        System.out.println(message.getContent());

    }
}
